//
//  UIButton+Extension.swift
//  SinaWeibo
//
//  Created by paycloud110 on 16/6/1.
//  Copyright © 2016年 paycloud110. All rights reserved.
//

import UIKit

extension UIButton
{
    convenience init(imageName: String, backGroundImage: String)
    {
        self.init()
        setImage(UIImage(named: imageName), forState: .Normal)
        setImage(UIImage(named: imageName + "_highlighted"), forState: .Highlighted)
        setBackgroundImage(UIImage(named: backGroundImage), forState: .Normal)
        setBackgroundImage(UIImage(named: backGroundImage + "_highlighted"), forState: .Highlighted)
        sizeToFit()
    }
}
